#!/usr/bin/env python
# coding=utf-8

class Student(object):
    def __init__(self):
        self.__score = 1
    @property
    def score(self):
        return self.__score
    @score.setter
    def score(self, value):
        print "check here"
        self.__score = value
    @score.deleter
    def score(self):
        print "delete here"
        del self.__score
s = Student()
print s.score
s.score = 12
print s.score
#下面一句报错，双下划线表示属性完全私有，禁止访问
#单下划线也表示是私有的，但是其实外界是可以访问的，全靠自觉
#print s.__score
del s.score
# 下一句报AttributeError
print s.score
